//
//  QuoteLvMinIndex.h
//  GAQuoteTradeLib
//
//  Created by  on 11-9-21.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#ifndef GAQuoteTradeLib_QuoteLvMinIndex_h
#define GAQuoteTradeLib_QuoteLvMinIndex_h

#include "QuoteLvData.h"

//lisz add 20110916 start
#define MIN_INDEX_L2XX_N1  60
#define MIN_INDEX_L2XX_N2  5
#define MIN_INDEX_L2XX_N3  10
//lisz add 20110916 end

///Leve2 ddx
typedef struct QUOTELV_MIN_DDX_tag
{
  double  ddx[MIN_MAX_NUM];
  double  ddxSum[MIN_MAX_NUM];
//  double  ddx2[MIN_MAX_NUM];
//  double  ddx3[MIN_MAX_NUM];
}QUOTELV_MIN_DDX;

///leve2 bbd
typedef struct QUOTELV_MIN_BBD_tag
{
  long64  bbd[MIN_MAX_NUM];
}QUOTELV_MIN_BBD;

///指标结构
typedef struct QUOTELV_MIN_INDEX_tag
{
  ///DDX
  QUOTELV_MIN_DDX DDX;
  ///BBD
  QUOTELV_MIN_BBD BBD;

  
}QUOTELV_MIN_INDEX;

/**分时线指标操作结构初始化
 *
 *  @param 无
 *
 *  @return QUOTELV_MIN_INDEX*	分时线指标指针
 *
 *		
 */
QUOTELV_MIN_INDEX* QuoteLvMinIndex_New();

/**计算DDX线
 *
 *  @param QUOTELV_MIN_INDEX*		aKIndex		操作结构指针
 *  @param QUOTELV_MIN_RES*			aRes      k线应答结构
 *
 *  @return -
 *
 *		
 */
void QuoteLvMinIndex_calcDDX(QUOTELV_MIN_INDEX* aMinIndex,
                             QUOTELV_MIN_RES* aRes);

/**计算BBD线,大单净差累积
 *
 *  @param QUOTELV_MIN_INDEX*		aKIndex		操作结构指针
 *  @param QUOTELV_MIN_RES*			aRes      k线应答结构
 *
 *  @return -
 *
 *		
 */
void QuoteLvMinIndex_calcBBD(QUOTELV_MIN_INDEX* aMinIndex,
                             QUOTELV_MIN_RES* aRes);
#endif
